import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../components/HomeView.vue";

import zonghe from "../views/GeneralInformation.vue";
import xianchang from "../views/ControlSite.vue";
import data from "../views/VisualData.vue";
import status from "../views/StatePrediction.vue";

import huanjingxinxi from "../views/huanjingxinxi.vue";

Vue.use(VueRouter);

const routes = [
  //配置主页路由
  {
    path: "/",
    name: "home",
    component: Home,
    redirect: "/zonghe",
    children: [
      {
        path: "/zonghe",
        component: zonghe,
        meta: { title: "综合信息" },
      },
      {
        path: "/xianchang",
        component: xianchang,
        meta: { title: "现场管控" },
      },
      {
        path: "/status",
        component: status,
        meta: { title: "综合信息" },
      },
      {
        path: "/data",
        component: data,
        meta: { title: "综合信息" },
      },
    ],
  },
  {
    path: "/huanjingxinxi",
    component: huanjingxinxi,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
